package com.shycloud.mido.music.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.shycloud.mido.music.domain.MisRedeemMusicCollection;
import com.shycloud.mido.music.mapper.MisRedeemMusicCollectionMapper;
import com.shycloud.mido.music.service.MisRedeemMusicCollectionService;
import com.shycloud.mido.music.vo.RedeemVO;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;

@Service
@AllArgsConstructor
public class MisRedeemMusicCollectionServiceImpl extends ServiceImpl<MisRedeemMusicCollectionMapper, MisRedeemMusicCollection> implements MisRedeemMusicCollectionService {

	/** 兑换曲谱模块 mapper */
	private MisRedeemMusicCollectionMapper redeemMapper;

	/**
	 * 分页获取【兑换曲谱】信息
	 *
	 * @param page
	 * @param phone
	 * @param bookNumber
	 * @return com.baomidou.mybatisplus.core.metadata.IPage<com.shycloud.mido.music.domain.MisRedeemMusicCollection>
	 * @author nianhua.jiang
	 * @date 2020/5/27 9:49
	 */
	@Override
	public IPage<RedeemVO> getRedeemMusicCollection(Page page, String phone, String bookNumber) {
		return redeemMapper.getRedeemMusicCollection(page, phone, bookNumber);
	}

	/**
	 * 获取有声图书数量
	 *
	 * @param
	 * @return java.lang.Integer
	 * @author nianhua.jiang
	 * @date 2020/5/28 9:43
	 */
	@Override
	public Integer getBookCount() {
		return redeemMapper.getBookCount();
	}
}
